package com.lin.fengxiu.repository;

import com.lin.fengxiu.model.Activity;
import com.lin.fengxiu.model.Category;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import javax.swing.text.html.Option;
import java.util.List;
import java.util.Optional;

/**
 * @ClassName ActivityRepository
 * @Description TODO 活动实体持久层
 * @Author wushaopei
 * @Date 2021/3/16 23:39
 * @Version 1.0
 */
@Repository
public interface ActivityRepository extends JpaRepository<Activity,Long> {

    Activity findByName(String name);

    Optional<Activity> findByCouponListId(Long couponId);
}
